UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MTUvZFNHSXtdvx9PeOkfJz70ZDWAVxmMoX5aLMPFG1w='
WHERE
key_id = '042595fd433e5689dd3e2230910743795abb37ffe794c27606f4dda555c46e48'
AND (
token = 'MTUvZFNHSXtdvx9PeOkfJz70ZDWAVxmMoX5aLMPFG1w='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)