UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '/3nYmTy+lNeppzBKGmzjQUgEU3TZYWsz0aZlXuLN6ZQ='
WHERE
key_id = 'defd8dc320440ae2f6c60eb3379d6cda9f4cbc24ea371be2f512a88619908f87'
AND (
token = '/3nYmTy+lNeppzBKGmzjQUgEU3TZYWsz0aZlXuLN6ZQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)