UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mH/YE4QAvPm7Y4jNfpZOpvH+rV3ID8K4TN6b6taiGRQ='
WHERE
key_id = '10a6ebdb3260f9c06e98e538df48845483cae59ffa8c1290dc93ec377c45f620'
AND (
token = 'mH/YE4QAvPm7Y4jNfpZOpvH+rV3ID8K4TN6b6taiGRQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)