UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/s9GA+0UQtdHjwM+57/Avu3blopG/5tgXHrIVrCMs4s='
WHERE
key_id = '73681cf5671db19720a6d1d829acb3577bf5730378af95aadd91999f32bb7988'
AND (
token = '/s9GA+0UQtdHjwM+57/Avu3blopG/5tgXHrIVrCMs4s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)