UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rISORitT30sr0RygwaFkHWvMpVgG2Vd8E8dxF0SVu1s='
WHERE
key_id = 'a7f4b0b83c9f201c5fc6a7365e451a449e18f3fa0e952042e8fcbc374b0d11b2'
AND (
token = 'rISORitT30sr0RygwaFkHWvMpVgG2Vd8E8dxF0SVu1s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)