UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zKRFnLgLLqMhlgrBlsBJt/CjqBzoBEdIfcc65fak/Gc='
WHERE
key_id = '99b73eb7f953f819eeb10b61e644a070da36e18b69b0c51636cda37520c389ad'
AND (
token = 'zKRFnLgLLqMhlgrBlsBJt/CjqBzoBEdIfcc65fak/Gc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)