UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'no+priy+DcP7EnGBvoJKl3WXaGdUwgk56HNWUjL7weM='
WHERE
key_id = '1745eb0e62b801ca82d2a549b1bc2d3de7036fec99e11081db8e3e315ed3bc61'
AND (
token = 'no+priy+DcP7EnGBvoJKl3WXaGdUwgk56HNWUjL7weM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)