UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6x4YinN3ccfIz/PmDgjO+XP/DTdI2Ot4qGFOUj6P7Ng='
WHERE
key_id = '81c6cf01cd31022ccf43ab9cc9144c8188da31dca40270e478f8e4fee6ec4e8a'
AND (
token = '6x4YinN3ccfIz/PmDgjO+XP/DTdI2Ot4qGFOUj6P7Ng='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)