UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PL36hZL3RlB423X4dyjARNmPKGrgXR0dxfJKd9DZMtM='
WHERE
key_id = '446a9d109b92c802114f81ec78643da5c87055d1f7880e3f38300af04a3c7813'
AND (
token = 'PL36hZL3RlB423X4dyjARNmPKGrgXR0dxfJKd9DZMtM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)