UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '57/G+wRJzQ30kIhKHpz4yCG5xKvUAXXjdeLACkYXlSY=' 
WHERE 
  key_id = 'c6cda8bba48bc16edaef24489071bffc141824700af9800b113f2122f5d5b99d' 
  AND (
    token = '57/G+wRJzQ30kIhKHpz4yCG5xKvUAXXjdeLACkYXlSY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00042