UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '5ooL0ra1JcW/pO6C08tlgN6ymYurSelEvJS/MMSBPaQ=' 
WHERE 
  key_id = 'e3da2f8ca451f4f7bf7b71156337237f401f06ece57d66c9d1178ac6d4e6b9d1' 
  AND (
    token = '5ooL0ra1JcW/pO6C08tlgN6ymYurSelEvJS/MMSBPaQ=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022