UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V2UCqFXD0dHNrh0o1gsZgu1Hk/txx+fPnzqJXVlF4t4='
WHERE
key_id = 'e7eb86af75bdfc9af4dd227148b4bd1b584a8c6a3bd131e14a79c020977b50a6'
AND (
token = 'V2UCqFXD0dHNrh0o1gsZgu1Hk/txx+fPnzqJXVlF4t4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)