UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '6VGSGAo8zGmzL+EAe6j/Bom6/45wtuGwoKvFokWIATo='
WHERE
key_id = 'fbdc6a4fb70881143740d6bbf19836a1c100bdced6b517f5efa09a1ea8260185'
AND (
token = '6VGSGAo8zGmzL+EAe6j/Bom6/45wtuGwoKvFokWIATo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)