UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M4U6pRz0RYdXVajjBd8nfXnSlokR0avPrbIOn/FicBI='
WHERE
key_id = '43a084cef563ec1bc367b2c719e901191b7979a8ead038cf33f5d4f730b55df2'
AND (
token = 'M4U6pRz0RYdXVajjBd8nfXnSlokR0avPrbIOn/FicBI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)