UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '7jDmC/Apurws+d86Eyc1yJo0+3NqnJD1QOgzII/Fsvc='
WHERE
key_id = '9dc9b947ce16fa41b73efd4a9204994d2b3bd31bbb53a2c4adc873327590dd0d'
AND (
token = '7jDmC/Apurws+d86Eyc1yJo0+3NqnJD1QOgzII/Fsvc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)