UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/Jdpo288qDNL7R8zL/ePDtAMywpwlpjVsu3PPbYzaZI='
WHERE
key_id = 'bb89a300764454004933409ba167286f479f72d7f9f016813bd742e1bcf96483'
AND (
token = '/Jdpo288qDNL7R8zL/ePDtAMywpwlpjVsu3PPbYzaZI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)