UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vrrxtznU/Tb16La1VS0vC+KDuubKcoM5cfHhDKgwgn0='
WHERE
key_id = '353f979dc37b629166a08d7d33555a0d194e7ab4d082e0d1d069219ac3fecee5'
AND (
token = 'vrrxtznU/Tb16La1VS0vC+KDuubKcoM5cfHhDKgwgn0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)