UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'wFk1ufSXzkKcw71nZ59T94a2+srFQfXdzgaZPK5kSTI='
WHERE
key_id = '93256a40f0ebe676da43a533867e15661a3cc7ac5caf9451444b465af38978f5'
AND (
token = 'wFk1ufSXzkKcw71nZ59T94a2+srFQfXdzgaZPK5kSTI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)