UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fxxoa51Z6kD5gM4ioK0mdIYccWekzrJtttGhQQtbHfw=' 
WHERE 
  key_id = '0b1fac8ada0fcdf457c40d199857707555affd7870fbfe079d59379f8f664e01' 
  AND (
    token = 'Fxxoa51Z6kD5gM4ioK0mdIYccWekzrJtttGhQQtbHfw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022