UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '1dAXkrOrdTxTp8fi9Bidi1in+XJq2WV03tCb4okyXe4='
WHERE
key_id = 'd8cf8c5502daabaa299bc7812504a6272a344f9020a824ab64cbdba214931b2c'
AND (
token = '1dAXkrOrdTxTp8fi9Bidi1in+XJq2WV03tCb4okyXe4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)