UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'L+InWsWBfAB2NH5i/d0mjpOAClqA6vcNgKTHBhfGFjQ='
WHERE
key_id = '7499300fa5e57523fa62dd991d6ec52ee46c2da4ff657916ef1c90234f83e010'
AND (
token = 'L+InWsWBfAB2NH5i/d0mjpOAClqA6vcNgKTHBhfGFjQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)