UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'LboV31WNKr+Ul+H3Whm78u6Jjf9gGun9g50rnKKOFg0='
WHERE
key_id = '2ad92de888b289d78ffaff7a7747a64ef1314308db12149af37fd67975896136'
AND (
token = 'LboV31WNKr+Ul+H3Whm78u6Jjf9gGun9g50rnKKOFg0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)