UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'vWEmQ7eP+f+8YVBn1SiWTH1xwbUhin8ovL+7I4NXiHA='
WHERE
key_id = '7255e9d61c5dba55587fc15c8c9f2537a5b58853d89da1c7758f5e666d4732fe'
AND (
token = 'vWEmQ7eP+f+8YVBn1SiWTH1xwbUhin8ovL+7I4NXiHA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)