UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zvfN0mnEkfC7ptWG7B6YL4y/qI9DGhXCl624e7VH6n8='
WHERE
key_id = 'e01d626c671bf9890651c253e3d45e1322fecd79660dc4efacca3ffb7d9b7a27'
AND (
token = 'zvfN0mnEkfC7ptWG7B6YL4y/qI9DGhXCl624e7VH6n8='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)