UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'bQcJpjUc2gNDF7pEFo4i0FimiqcYTZ70yKk9xBvJiIA=' 
WHERE 
  key_id = '9da649a833b86544fdf587fe77cc0ef0ad6f14c9f5e5a612604ea84c209c3006' 
  AND (
    token = 'bQcJpjUc2gNDF7pEFo4i0FimiqcYTZ70yKk9xBvJiIA=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00022