UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'oyvBSix/517Qcy64rEv59RzkLX7xGPNDTn1Ab7gRZCU='
WHERE
key_id = '552dd8ba06850e4f1886f6263a6db610048bbd0767909aa0f4742bb1811f3988'
AND (
token = 'oyvBSix/517Qcy64rEv59RzkLX7xGPNDTn1Ab7gRZCU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)