UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'l75JknAUf6Q2EG/4xGTBlo/ZcR5o/96LyGliJcmymbU='
WHERE
key_id = '84b7f8f17282995097f82e48c02fb1c9d90b355a5159fa4117452365ecbf7819'
AND (
token = 'l75JknAUf6Q2EG/4xGTBlo/ZcR5o/96LyGliJcmymbU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)